//
//  UIImage+SWAdd.h
//  QZMJ
//
//  Created by 曾少伟 on 2016/12/5.
//  Copyright © 2016年 曾少伟. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (SWAdd)

+ (UIImage *)cutimageFromSourceName:(NSString *)sourceName
                  andPlistImageName:(NSString *)imageName;

+ (UIImage *)cutimageFromSourceName:(NSString *)sourceName
                  andPlistImageName:(NSString *)imageName
                           imgScale:(CGFloat)scale;

+ (UIImage *)cutimageFitScaleHFromSourceName:(NSString *)sourceName
                           andPlistImageName:(NSString *)imageName
                                    imgScale:(CGFloat)scale;

+ (UIImage *)cutimageFromSourceName:(NSString *)sourceName
                  andPlistImageName:(NSString *)imageName
                           imgScale:(CGFloat)scale
                           fitScale:(CGFloat)fitScale;

- (UIImage *)resizableImage;

- (UIImage *)resizableImageWithPoint:(CGPoint)point;

- ( UIImage *)imageWithNewScaledToSize:( CGSize )newSize;

- (UIImage *)imageWithNewScaled:(CGFloat)scale;

- ( UIImage *)getImageInRect:( CGRect )rect;
// *** 拼接图片
+ (UIImage *) combine:(UIImage*)leftImage :(UIImage*)rightImage;
// *** 将一张图片画到自己的右上角
- (UIImage *) appendImg:(UIImage*)image;
- (UIImage *) appendGoldImg:(UIImage*)image offsetX:(CGFloat)offsetX;

-(UIImage *)transformImageSkewWithAngel:(CGFloat)angle;

/**
 修改图片 通过transform
 */
- (UIImage *)changeImageByTransform:(CGAffineTransform)transform ;

/**
 修改图片的水平倾斜
 @param angel 角度0~360
 */
- (UIImage *)imageXListWithAngel:(CGFloat)angel;
/**
 修改图片的垂直倾斜
 @param angel 角度0~360
 */
- (UIImage *)imageYListWithAngel:(CGFloat)angel;
/*
 在自己的图片正中央画上另外一张图片
 */
- (UIImage *)drawImageOnCenter:(UIImage *)image;
@end
